package com.dk.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class News {
    private Integer newsId;

    private String newsTitle;

    private Integer newsType;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date newsTime;

    private String newsFlag;

    @Override
    public String toString() {
        return "News{" +
                "newsId=" + newsId +
                ", newsTitle='" + newsTitle + '\'' +
                ", newsType=" + newsType +
                ", newsTime=" + newsTime +
                ", newsFlag='" + newsFlag + '\'' +
                ", newsWriter='" + newsWriter + '\'' +
                ", text='" + text + '\'' +
                ", newsContent='" + newsContent + '\'' +
                '}';
    }

    public News() {this.newsId = newsId;
        this.newsTitle = newsTitle;
        this.newsType = newsType;
        this.newsTime = newsTime;
        this.newsFlag = newsFlag;
        this.newsWriter = newsWriter;
        this.text = text;
        this.newsContent = newsContent;
    }

    public News(Integer newsId, String newsTitle, Integer newsType, Date newsTime, String newsFlag, String newsWriter, String text, String newsContent) {

    }

    private String newsWriter;

    private String text;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    private String newsContent;

    public Integer getNewsId() {
        return newsId;
    }

    public void setNewsId(Integer newsId) {
        this.newsId = newsId;
    }

    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle(String newsTitle) {
        this.newsTitle = newsTitle == null ? null : newsTitle.trim();
    }

    public Integer getNewsType() {
        return newsType;
    }

    public void setNewsType(Integer newsType) {
        this.newsType = newsType;
    }

    public Date getNewsTime() {
        return newsTime;
    }

    public void setNewsTime(Date newsTime) {
        this.newsTime = newsTime;
    }

    public String getNewsFlag() {
        return newsFlag;
    }

    public void setNewsFlag(String newsFlag) {
        this.newsFlag = newsFlag == null ? null : newsFlag.trim();
    }

    public String getNewsWriter() {
        return newsWriter;
    }

    public void setNewsWriter(String newsWriter) {
        this.newsWriter = newsWriter == null ? null : newsWriter.trim();
    }

    public String getNewsContent() {
        return newsContent;
    }

    public void setNewsContent(String newsContent) {
        this.newsContent = newsContent == null ? null : newsContent.trim();
    }
}